Subject: overkill on portability macros
From: Dan Connolly <[email-masked]>
To: [email-masked]
Date: Sun, 07 Jun 92 01:15:34 CDT

Are these abuses of the preprocessor really necessary?

----
PRIVATE char from_hex ARGS1(char, c)
{
}
----
Ok, I've seen PRIVATE before (though I don't know what it's
for. Some sort of MS DOS near/far thing?)

But ANSI C and PCC share syntax for _defining_ functions.
The preprocessor dancing is necessary for _declaring_ functions
like so:

int foo __ARGS__((int x, int y, int z));

but in the .c files, you can just do the usual

int foo(x,y,z)
int x;
int y;
int z;

and ANSI an PCC compilers alike will be happy, with one
exception: varargs. Functions with

int foo(int x, ...);

style declarations need corresponding

int foo(int x, ...)
{
}

style definitions.

Dan